-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement support for Android TalkBack #17704
base: master
Are you sure you want to change the base?
Conversation
cf694f6
to
89c4fff
Compare
89c4fff
to
d64e513
Compare
You can test this PR using the following package version. |
|
@cla-avalonia agree |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
Apologies for all the quick fixes, I've been using the nuget feed to test with my own app on a BrailleNote device to troubleshoot issues. I've finally finished with the main code for this PR now, so feel free to review what I have so we can wrap this up! |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
src/Avalonia.Controls/Automation/Peers/TextBoxAutomationPeer.cs
Outdated
Show resolved
Hide resolved
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
What does the pull request do?
This pull request adds a much-needed implementation of UI automation / screen reader accessibility features to the Android implementation of Avalonia. It does so by implementing Android's ExploreByTouchHelper built-in as a compatibility shim between Avalonia's own
AutomationPeer
API and Android'sAccessibilityNodeInfo
API.What is the current behavior?
The current behavior of Avalonia on Android is to essentially operate as a dynamically rendered raster
SurfaceView
which is completely opaque to screen readers such as Android's TalkBack or HumanWare's KeySoft. This is completely unsuitable for users who have visual and/or cognitive impairments and need a screen reader to help them understand what's on the screen.What is the updated/expected behavior with this PR?
The new behavior that this PR implements is a fully functional prototype integration between Avalonia and Android's various accessibility APIs. This integration includes support for all relevant specialized "providers" within the
AutomationPeer
API and creates a performant, responsive, and verbose user experience for visually impaired users of Avalonia apps on Android.To test, enable TalkBack on your Android mobile device and run the ControlCatalog sample. You will observe that the "explore by touch" feature now responds appropriately to user input and allows them to hover over interactive elements like buttons and text fields in order to focus them and have their attached labels read aloud.
How was the solution implemented (if it's not obvious)?
The solution was implemented by implementing a specialized
AccessibilityDelegateCompat
via Android'sExploreByTouch
abstract. This delegate acts as a plug-in for Avalonia's existing automation features into Android's accessibility APIs designed for custom controls.Checklist
Breaking changes
This PR only modifies internal
Avalonia.Android
functionality and as such does not expose any new APIs or make changes to the existing API surface.Fixed issues